; Fix last change in sqlite.c
authorEli Zaretskii <eliz@gnu.org>
Thu, 6 Jun 2024 10:06:58 +0000 (13:06 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 6 Jun 2024 10:06:58 +0000 (13:06 +0300)
* etc/NEWS:
* doc/lispref/text.texi (Database):
* src/sqlite.c (Fsqlite_execute_batch): Fix last change (Bug#70145).

doc/lispref/text.texi
etc/NEWS
src/sqlite.c

index 7f2123d06f99aac1fc6c3774f2e034a257f4350e..41ab90a80f375216c9f9259d686931cca3f1fc7e 100644 (file)
@@ -5417,8 +5417,8 @@ called @var{gif}, you have to mark it specially to let
 @defun sqlite-execute-batch db statements
 Execute the @acronym{SQL} @var{statements}.  @var{statements} is a
 string containing 0 or more @acronym{SQL} statements.  This command
-might be useful when we want to execute multiple @acronym{DDL}
-statements.
+might be useful when a Lisp program needs to execute multiple Data
+Definition Language (@acronym{DDL}) statements in one go.
 
 @end defun
 
index b53136e3ba2843a1c7280a57a1aba09dc9a827c5..808cd0562dbf01932f8fdc335905a2a2fcdaf7fc 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -485,10 +485,10 @@ its shebang line, Emacs will now skip over 'env -S' and deduce the
 major mode based on the interpreter after 'env -S'.
 
 +++
-** New command 'sqlite-execute-batch'.
-This command lets the user execute multiple SQL commands in one
-command.  It is useful when the user wants to evaluate an entire SQL
-file.
+** New function 'sqlite-execute-batch'.
+This function lets the user execute multiple SQL statements in one go.
+It is useful, for example, when a Lisp program needs to evaluate an
+entire SQL file.
 
 +++
 \f
index c606fa5f831b113c708fce947ec7f7e39704dfe3..53f9d095114ff0d124eae2cd2d8ba427a573fc66 100644 (file)
@@ -647,13 +647,13 @@ sqlite_exec (sqlite3 *sdb, const char *query)
 }
 
 DEFUN ("sqlite-execute-batch", Fsqlite_execute_batch, Ssqlite_execute_batch, 2, 2, 0,
-       doc: /* Execute multiple SQL statements in DB.
-Query is a string containing 0 or more SQL statements.  */)
-  (Lisp_Object db, Lisp_Object query)
+       doc: /* Execute multiple SQL STATEMENTS in DB.
+STATEMENTS is a string containing 0 or more SQL statements.  */)
+  (Lisp_Object db, Lisp_Object statements)
 {
   check_sqlite (db, false);
-  CHECK_STRING (query);
-  Lisp_Object encoded = encode_string(query);
+  CHECK_STRING (statements);
+  Lisp_Object encoded = encode_string (statements);
   return sqlite_exec (XSQLITE (db)->db, SSDATA (encoded));
 }